package com.musictab.spring.service;

import javax.annotation.Resource;

import org.nutz.dao.Dao;
import org.springframework.stereotype.Service;

import com.musictab.spring.model.Person;

@Service
public class TestNutzService {

	@Resource
	Dao dao;

	public void test() {

		Person p = new Person();
		p.setName("ABC");
		p.setAge(20);
		dao.insert(p);

	}

	public Person getUser() {

		Person p = dao.fetch(Person.class, "ABC");

		return p;
	}
}
